<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<link th:href="@{/statics/css/index.css}" type="text/css" rel="stylesheet">
<script th:src="@{/statics/未压缩版.js}" type="text/javascript"></script>
<script th:src="@{/statics/js/updateUser.js}" type="text/javascript"></script>


<link th:href="@{/statics/layui-v2.7.6/layui/css/layui.css}" type="text/css" rel="stylesheet">
<script th:src="@{/statics/layui-v2.7.6/layui/layui.js}" type="text/javascript"></script>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="update" th:object="${user}">
    <form th:action="@{/user/update}" method="post" >
        <div>
            用户ID：<input type="hidden" name="id" th:value="*{id}">
        </div>
        <div>
            用户编码：<input type="text" name="userCode" th:value="*{userCode}">
        </div>
        <div>
            用户名：<input type="text" name="userName" th:value="*{userName}">
        </div>
        <div>
            密码：<input type="password" name="userPassword" th:value="*{userPassword}">
        </div>
        <div>
            用户性别： <select name="gender">
            <option th:selected="${user.gender==1}" value="1">男</option>
            <option th:selected="${user.gender==2}" value="2">女</option>
        </select>
        </div>
        <div>
            用户生日：<input type="text" id="birthday" th:value="${#dates.format(user.birthday,'yyyy-MM-dd')}" name="birthday">
        </div>
        <div>
            <input type="submit" value="保存">
            <input type="button" id="back" value="返回">
        </div>
    </form>
</div>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#birthday' //指定元素
        });
    });
</script>
</body>
</html>